﻿using Kingdee.BOS.Core.DynamicForm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Kingdee.BOS.Core.Bill.PlugIn;
using Kingdee.BOS.Orm.DataEntity;
using Kingdee.BOS.Util;
using Kingdee.BOS.Core.Bill.PlugIn.Args;
using Kingdee.BOS.Core.Metadata.FormElement;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.JSON;
using Kingdee.BOS.App.Data;
using System.Data;
using Kingdee.BOS.Core.Metadata;

namespace LiMinCRMPlugin
{
    /// <summary>
    /// 生产月计划      2024年4月23日
    /// </summary>
    [System.ComponentModel.Description("生产月计划表单插件")]
    [HotUpdate]
    public class MonProductionPlanForm : AbstractBillPlugIn
    {
        public override void BeforeSave(BeforeSaveEventArgs e)
        {
            base.BeforeSave(e);

        }

        public override void EntryButtonCellClick(EntryButtonCellClickEventArgs e)
        {
            base.EntryButtonCellClick(e);


        }

        /// <summary>
        /// 初始化，对其他界面传来的参数进行处理，对控件某些属性进行处理
        /// 这里不宜对数据DataModel进行处理
        /// </summary>
        /// <param name="e"></param>
        public override void AfterBindData(EventArgs e)
        {
            base.AfterBindData(e);
            //只有新增状态读取
            if (this.View.OpenParameter.Status == OperationStatus.ADDNEW)
            {
                int year = DateTime.Now.Year;
                int month = DateTime.Now.Month;
                this.View.Model.SetValue("F_RDLV_Year", year.ToString());
                this.View.Model.SetValue("F_RDLV_Month", month.ToString());
            }
        }

    }
}
